const app = getApp(),url = app.globalData.url;
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  sf(){
    wx.navigateTo({
      url: '/HomePage/sf/sf',
    })
  },
  out(){
    wx.clearStorageSync({})
    wx.showToast({
      title: '退出成功',
      icon:'none',
    })
    setTimeout(function(){
      wx.reLaunch({
        url: '/pages/index/index',
      })
    },1500)
  },
  editphone(){
    wx.navigateTo({
      url: '/HomePage/editPhone/editPhone',
    })
  },
  editpass(){
    wx.navigateTo({
      url: '/HomePage/editPass/editPass',
    })
  },
  about_tk(e){
    console.log(e)
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/HomePage/ab_tk/ab_tk?id='+id,
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var that = this
    var phone = wx.getStorageSync('phone')
    var tel = phone;
    tel = "" + tel;
    var tel1 = tel.substr(0,3) + "****" + tel.substr(7)
    console.log(tel1);
    that.setData({phone:tel1})
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})